-
-
Notifications
You must be signed in to change notification settings - Fork 8.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feature/add null alt text to several images #9296
base: master
Are you sure you want to change the base?
Feature/add null alt text to several images #9296
Conversation
merging current changes
Yay, your first pull request towards Jenkins core was created successfully! Thank you so much! |
@JanhviHarwani I'm leaving this pull request open because it might address the Jira issue that is mentioned. It does not complete the pull request template. It does not provide a description of the testing that was performed to assure that the pull request works as expected. It does not include a usable changelog entry. Could you complete those items on the pull request? We're happy to have more contributors to Jenkins, but we need those new contributors to follow the processes that we've outlined so that we don't waste the time of maintainers as they process pull requests that do not provide the required information. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the proposals. I've suggested different text based on the context of the images.
.github/config.yml
Outdated
@@ -20,6 +20,6 @@ firstPRMergeComment: > | |||
|
|||
<a href="https://www.jenkins.io/participate/" target="_blank"> | |||
<picture> | |||
<img width="600" src="https://raw.githubusercontent.com/jenkinsci/jenkins/master/.github/images/jenkins-welcome.svg"> | |||
<img width="600" alt="jenkins welcome page" src="https://raw.githubusercontent.com/jenkinsci/jenkins/master/.github/images/jenkins-welcome.svg"> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Jenkins is an English language proper noun. It needs to be capitalized.
<img width="600" alt="jenkins welcome page" src="https://raw.githubusercontent.com/jenkinsci/jenkins/master/.github/images/jenkins-welcome.svg"> | |
<img width="600" alt="Jenkins welcome page" src="https://raw.githubusercontent.com/jenkinsci/jenkins/master/.github/images/jenkins-welcome.svg"> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Needs to be localizable.
<img width="600" alt="jenkins welcome page" src="https://raw.githubusercontent.com/jenkinsci/jenkins/master/.github/images/jenkins-welcome.svg"> | |
<img width="600" alt="${%Jenkins welcome page}" src="https://raw.githubusercontent.com/jenkinsci/jenkins/master/.github/images/jenkins-welcome.svg"> |
Additionally I am not sure welcome page adequately describes what this is.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think that we can localize the text in pages that are generated by GitHub Actions.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good point, I managed to comment this on the only file it doesn't apply to 😅 (all your suggestions are not localizable).
@@ -61,7 +61,7 @@ THE SOFTWARE. | |||
</j:otherwise> | |||
</j:choose> | |||
</div> | |||
<img src="graph?type=${type}&width=500&height=300" /> | |||
<img src="graph?type=${type}&width=500&height=300" alt="null" /> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since this is the memory usage monitor graph, I think that the alt text should say that. The word "null" won't help a disabled user understand what is being shown in the image.
<img src="graph?type=${type}&width=500&height=300" alt="null" /> | |
<img src="graph?type=${type}&width=500&height=300" alt="memory usage monitor graph" /> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Resolved in 904cb3e
core/src/main/resources/hudson/model/DirectoryBrowserSupport/dir.jelly
Outdated
Show resolved
Hide resolved
core/src/main/resources/hudson/model/DirectoryBrowserSupport/dir.jelly
Outdated
Show resolved
Hide resolved
core/src/main/resources/hudson/model/DirectoryBrowserSupport/dir.jelly
Outdated
Show resolved
Hide resolved
core/src/main/resources/jenkins/model/Jenkins/_404_simple.jelly
Outdated
Show resolved
Hide resolved
@@ -32,7 +32,7 @@ THE SOFTWARE. | |||
<l:header /> | |||
<l:main-panel> | |||
<h1 style="text-align: center"> | |||
<img src="${imagesURL}/rage.svg" height="179" width="154"/> <span style="font-size:50px"><st:nbsp/>${%Oops!}</span> | |||
<img src="${imagesURL}/rage.svg" height="179" width="154" alt="null"/> <span style="font-size:50px"><st:nbsp/>${%Oops!}</span> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
<img src="${imagesURL}/rage.svg" height="179" width="154" alt="null"/> <span style="font-size:50px"><st:nbsp/>${%Oops!}</span> | |
<img src="${imagesURL}/rage.svg" height="179" width="154" alt="Oops"/> <span style="font-size:50px"><st:nbsp/>${%Oops!}</span> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Decorative only. Also, null
isn't intended as a literal value, but to represent the explicitly specified empty value (alt=""
).
<img src="${imagesURL}/rage.svg" height="179" width="154" alt="null"/> <span style="font-size:50px"><st:nbsp/>${%Oops!}</span> | |
<img src="${imagesURL}/rage.svg" height="179" width="154" alt=""/> <span style="font-size:50px"><st:nbsp/>${%Oops!}</span> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Resolved in 4d8fd42
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This PR misunderstands the recommendation in Jira. null
isn't intended as a literal value, but to represent the explicitly specified empty value (alt=""
).
.github/config.yml
Outdated
@@ -20,6 +20,6 @@ firstPRMergeComment: > | |||
|
|||
<a href="https://www.jenkins.io/participate/" target="_blank"> | |||
<picture> | |||
<img width="600" src="https://raw.githubusercontent.com/jenkinsci/jenkins/master/.github/images/jenkins-welcome.svg"> | |||
<img width="600" alt="jenkins welcome page" src="https://raw.githubusercontent.com/jenkinsci/jenkins/master/.github/images/jenkins-welcome.svg"> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Needs to be localizable.
<img width="600" alt="jenkins welcome page" src="https://raw.githubusercontent.com/jenkinsci/jenkins/master/.github/images/jenkins-welcome.svg"> | |
<img width="600" alt="${%Jenkins welcome page}" src="https://raw.githubusercontent.com/jenkinsci/jenkins/master/.github/images/jenkins-welcome.svg"> |
Additionally I am not sure welcome page adequately describes what this is.
@@ -32,7 +32,7 @@ THE SOFTWARE. | |||
<l:header /> | |||
<l:main-panel> | |||
<h1 style="text-align: center"> | |||
<img src="${imagesURL}/rage.svg" height="179" width="154"/> <span style="font-size:50px"><st:nbsp/>${%Oops!}</span> | |||
<img src="${imagesURL}/rage.svg" height="179" width="154" alt="null"/> <span style="font-size:50px"><st:nbsp/>${%Oops!}</span> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Decorative only. Also, null
isn't intended as a literal value, but to represent the explicitly specified empty value (alt=""
).
<img src="${imagesURL}/rage.svg" height="179" width="154" alt="null"/> <span style="font-size:50px"><st:nbsp/>${%Oops!}</span> | |
<img src="${imagesURL}/rage.svg" height="179" width="154" alt=""/> <span style="font-size:50px"><st:nbsp/>${%Oops!}</span> |
merge jenkins master branch to feature/add-null-text
…o feature/add-null-text-alt
merging to local branch
…Harwani/jenkins into feature/add-null-text-alt
I have resolved all the comments in the PR. Thank you for taking out time to look at the PR. |
.github/config.yml
Outdated
@@ -20,6 +20,6 @@ firstPRMergeComment: > | |||
|
|||
<a href="https://www.jenkins.io/participate/" target="_blank"> | |||
<picture> | |||
<img width="600" src="https://raw.githubusercontent.com/jenkinsci/jenkins/master/.github/images/jenkins-welcome.svg"> | |||
<img width="600" alt=${%Jenkins welcome page} src="https://raw.githubusercontent.com/jenkinsci/jenkins/master/.github/images/jenkins-welcome.svg"> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This applied the wrong suggestion from the comment thread. Mark pointed out I was wrong. (Also would be syntactically invalid in Jelly.)
<img width="600" alt=${%Jenkins welcome page} src="https://raw.githubusercontent.com/jenkinsci/jenkins/master/.github/images/jenkins-welcome.svg"> | |
<img width="600" alt="Jenkins welcome page" src="https://raw.githubusercontent.com/jenkinsci/jenkins/master/.github/images/jenkins-welcome.svg"> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(Also I'm not sure this particular alt text is good, but that's a separate problem. I encourage you to consider what the image represents on this page, and how that would be accomplished in alt
text.)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Alt text updated in 87d4ab4
@@ -61,7 +61,7 @@ THE SOFTWARE. | |||
</j:otherwise> | |||
</j:choose> | |||
</div> | |||
<img src="graph?type=${type}&width=500&height=300" /> | |||
<img src="graph?type=${type}&width=500&height=300" alt="memory usage monitor graph" /> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
<img src="graph?type=${type}&width=500&height=300" alt="memory usage monitor graph" /> | |
<img src="graph?type=${type}&width=500&height=300" alt="${%memory usage monitor graph}" /> |
The same applies to all .jelly
files. (Previously mentioned in #9296 (comment))
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed in 904cb3e
@@ -50,13 +50,13 @@ THE SOFTWARE. | |||
${%No files in directory} | |||
<j:if test="${showSymlinkWarning}"> | |||
<p> | |||
<img id="symlinkalert" src="${imagesURL}/svgs/warning.svg" width="16" height="16" /> | |||
<img id="symlinkalert" src="${imagesURL}/svgs/warning.svg" width="16" height="16" alt="symlink alert"/> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since the text in the next line exists, there is no need for an alt text here. This icon exists only to make the notice stand out.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Resolved in 8d861dd
${%Symlinks are hidden} | ||
</p> | ||
</j:if> | ||
<j:if test="${showTmpDirWarning}"> | ||
<p> | ||
<img id="tmpdiralert" src="${imagesURL}/svgs/warning.svg" width="16" height="16" /> | ||
<img id="tmpdiralert" src="${imagesURL}/svgs/warning.svg" width="16" height="16" alt="temporary directory warning"/> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since the text in the next line exists, there is no need for an alt text here. This icon exists only to make the notice stand out.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Resolved in 8d861dd
@@ -124,13 +124,13 @@ THE SOFTWARE. | |||
</table> | |||
<j:if test="${showSymlinkWarning}"> | |||
<p> | |||
<img id="alert" src="${imagesURL}/svgs/warning.svg" width="16" height="16" /> | |||
<img id="alert" src="${imagesURL}/svgs/warning.svg" width="16" height="16" alt="symlink warning"/> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since the text in the next line exists, there is no need for an alt text here. This icon exists only to make the notice stand out.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Resolved in 8d861dd
${%Symlinks are hidden} | ||
</p> | ||
</j:if> | ||
<j:if test="${showTmpDirWarning}"> | ||
<p> | ||
<img id="alert" src="${imagesURL}/svgs/warning.svg" width="16" height="16" /> | ||
<img id="alert" src="${imagesURL}/svgs/warning.svg" width="16" height="16" alt="temporary directory warning"/> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since the text in the next line exists, there is no need for an alt text here. This icon exists only to make the notice stand out.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Resolved in 8d861dd
@@ -32,7 +32,7 @@ THE SOFTWARE. | |||
<l:header /> | |||
<l:main-panel> | |||
<h1 style="text-align: center"> | |||
<img src="${imagesURL}/rage.svg" height="179" width="154"/> <span style="font-size:50px"><st:nbsp/>${%Oops!}</span> | |||
<img src="${imagesURL}/rage.svg" height="179" width="154" alt=""/> <span style="font-size:50px"><st:nbsp/>${%Oops!}</span> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Inconsistent with the change in _404_simple.jelly
, why?
(Personally I like this one more for the same reason as I mentioned in a number of other comments.)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Resolved in 23d56f1 by using empty alt text
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not true, this is the only line in this PR you didn't update 😉
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for catching that. This was resolved in 4d8fd42
Please take a moment and address the merge conflicts of your pull request. Thanks! |
The destination page is describing the Jenkins project, not just Jenkins core. Addresses the comment in: jenkinsci#9296 (comment)
As noted by Daniel Beck, it does not help the user of the screen reader for us to show the same fundamental text message twice. The image in these cases is a hint for the reader of the message text that immediately follows the image. Cluttering the screen reader content with a second copy of the same message is not helpful.
No need to display the "not found" message twice in locations very near to each other.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this is ready to merge. Needs a review from at least one other maintainer
I attempted to display the memory usage monitor jelly change and could not find a way to reach it. The class is used in the system information page but the graph content is loaded JavaScript into a div on the page. The alt text in that JavaScript is "Memory usage graph" and does not appear to be internationalized. |
A possible URL for this page is |
Thanks. I've opened that URL and confirmed that the updated text is displayed and that the image is not displayed |
See JENKINS-62424.
Testing done
Confirmed the memory monitor text is visible from /extensionList/hudson.diagnosis.MemoryUsageMonitor/0/ and also confirmed that the graph does not render on that page
Proposed changelog entries
Proposed upgrade guidelines
N/A
Submitter checklist
Desired reviewers
@mention
Before the changes are marked as
ready-for-merge
:Maintainer checklist
Open Issue: https://issues.jenkins.io/plugins/servlet/mobile#issue/JENKINS-62424
resolved: added null text to alt attribute to img tags wherever necessary